<template>
  <div>详情页面</div>
  <div>
    <table>
      <thead>
      <tr>
        <th>姓名</th>
        <th>学号</th>
        <th>专业名称</th>
      </tr>
      </thead>
      <tbody>
      <tr v-for="student in detailsData" :key="student.id">
        <td>{{ student.name }}</td>
        <td>{{ student.accountNo }}</td>
        <td>{{ student.majorName }}</td>
      </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import request from "@/utils/request";
export default {
  data() {
    return {
      detailsData: [],
    };
  },
  mounted() {
    this.getData()
  },
  methods:{
    getData(){
      let noticeNo=sessionStorage.getItem("noticeNo")
      request.get("/info_account/getListByNoticeNo?noticeNo="+noticeNo).then(res=>{
        this.detailsData=res.data.data
        console.log(this.detailsData);
      })
    }
  }
};
</script>

<style scoped>
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border: 1px solid #ddd;
  padding: 8px;
}
thead {
  background-color: #f4f4f4;
}
</style>
